/*
 * @Author: 康浩 hao.kang02@geely.com
 * @Date: 2022-12-28 16:38:08
 * @LastEditors: 康某 carl0608@126.com
 * @LastEditTime: 2023-02-02 21:40:20
 * @FilePath: \vue3-template\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory } from "vue-router";

import Layout from "@/Layout/index.vue";
import Home from "../views/home/index.vue";
import Login from "../views/login/index.vue";
const routes = [
	{
		path: "/login",
		component: Login
	},
	{
		path: "/",
		component: Layout,
		redirect: "/home",
		children: [
			{
				path: "/home",
				component: Home
			}
		]
	},
];

const router = createRouter({
	history: createWebHistory("/vue3/"),
	routes
});

export default router;